package com.xmall.order.define.request.api;

import com.xmall.define.dto.product.SkuQuantity;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
public class OrderConfirmRequest implements Serializable {

    /**
     * 选中的收货地址ID
     */
    private Long addressId;

    /**
     * 选中的商品sku列表
     */
    @Valid
    @NotNull(message = "没有选中购买的商品")
    @Size(min = 1, message = "没有选中购买的商品")
    private List<SkuQuantity> skuQuantityList = new ArrayList<>();
}
